<?php

/**
 * public functions are reachable actions
 * protected/private functions are helpers
 *
 **/

class SampleController extends ApplicationController {


    public function __construct() {
        parent::__construct();
        $this->append_before_filter('check_auth');
        $this->append_before_filter('check_id', array('show','edit','update','delete'));
    }

    /**
     * $params are the http params in a hash table, so we can handle both $param = {}, and $param = {mm=>01, dd=>12, yyyy=> 2009}
     **/
    public function index($params) {
        $this->abc = '123';
    }

    public function show($params) {

    }

    public function edit($params) {

    }

    public function update($params) {

    }

    public function delete($params) {

    }

    protected function check_auth($params) {
        Logger::debug('checking auth');
    }

    protected function check_id($params) {
        Logger::debug('checking id');
    }
}